package com.dz.lm.common.util;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.vod.v20180717.VodClient;
import com.tencentcloudapi.vod.v20180717.models.DeleteMediaRequest;
import com.tencentcloudapi.vod.v20180717.models.DeleteMediaResponse;

public class DeleteMedia {
    public static void main(String[] args) {
        try {
            Credential cred = new Credential("AKIDB9sNdeI0LrAE3ePC8rXzDBvQghUEn14s", "kGWYVEhutd9PSRDl4A0cy6B1bw2tVryv");
            HttpProfile httpProfile = new HttpProfile();
            httpProfile.setEndpoint("vod.tencentcloudapi.com");
            ClientProfile clientProfile = new ClientProfile();
            clientProfile.setHttpProfile(httpProfile);
            VodClient client = new VodClient(cred, "", clientProfile);
            String params = "{\"FileId\":\"5285890799939799769\"}";
            DeleteMediaRequest req = DeleteMediaRequest.fromJsonString(params, DeleteMediaRequest.class);
            DeleteMediaResponse resp = client.DeleteMedia(req);
            System.out.println(DeleteMediaRequest.toJsonString(resp));
        } catch (TencentCloudSDKException e) {
            System.out.println(e.toString());
        }
    }
}